{% extends "../theme/bage.html" %}
{% block headinfo %}
<style type="text/css">
    table.diff {
        font-family: Courier;
        border: medium;
        width: 99%;
    }

    .diff_header {
        background-color: #e0e0e0
    }

    td.diff_header {
        text-align: right
    }

    .diff_next {
        background-color: #c0c0c0
    }

    .diff_add {
        background-color: #aaffaa
    }

    .diff_chg {
        background-color: #ffff77
    }

    .diff_sub {
        background-color: #ffaaaa
    }
</style>
{% end %}

{% block typebody %}
<ol class="breadcrumb">
    <li>{{ _('Current location') }}: <a href="{% module site_url() %}">{{ _('Home') }}</a></li>
    <li>{% module the_category(postinfo.uid) %}</li>
    <li class="active">{{ postinfo.title }}</li>
</ol>
<div class="panel panel-black">
    <div class="panel-heading">
        <h2>{{ postinfo.title }}</h2>
        <span>{{ str(postinfo.date)[:10] }}</span>
        <span>{{ _('Browse') }}: {{ postinfo.view_count }} </span>

        {% module widget_editor(router, postinfo.uid, userinfo,kind=postinfo.kind) %}
        <span class="btn-group"><a href="/{{ router }}/{{postinfo.uid}}" class="btn btn-xs btn-primary">{{ _('View') }}</a></span>

    </div>
    <div class="panel-body">
        <div class="entry">
            <div class="entrycontent">

                 {% if html_diff_arr %}
                {% for diff_dic in html_diff_arr %}
                {% if userinfo and kwd.get('can_review',False) %}
                <div class="bg-info">
                     <a href="/post_man/restore/{{ diff_dic['hist_uid'] }}" class="btn btn-sm btn-danger" title="Restore">
                        {{ _('Restore') }}
                    </a>
                    <a href="/post_man/delete/{{ diff_dic['hist_uid'] }}" class="btn btn-sm btn-danger" title="Delete">
                        {{ _('Delete') }}
                    </a>
                    <span style="color:#0000FF; padding:0 10px">
                        {{ _('Author') }} : {{ diff_dic['hist_user'] }}
                    </span>
                    <span style="color:#f00">
                       {{ _('Modify time') }} :  {{ datetime.datetime.fromtimestamp(diff_dic['hist_time']).strftime('%Y - %m - %d （%H : %M : %S）') }}&nbsp;

                    </span>
                    <span style="color:#0000FF">
                       {{ _('Updated number of words') }} :  {{ diff_dic['up_words_num'] }}&nbsp;
                    </span>
                </div>
                {% end %}
                {% raw (diff_dic['html_diff']) %}
                <p></p>
                {% end %}
                {% else %}
                {{ _('No modification record.') }}
                {% end %}

            </div>
        </div>
    </div>
</div>
{% end %}


